package com.fileshare.web.controller.index;

import javax.servlet.http.HttpServletRequest;

/**
 * 基类 Controller
 * 1. 简化返回视图
 * 2. 抽出公共代码
 */
public class BaseController {

    /**
     * 不带主题的页面
     */
    public String view(String viewName) {
        return "index/" + viewName;
    }

    public BaseController title(HttpServletRequest request, String title) {
        request.setAttribute("title", title);
        return this;
    }

}
